package com.ljcalc.business.components.fetchers;

import com.ljcalc.business.components.requests.SPTTHistoryResultRequest;
import com.ljcalc.business.components.requests.SSLHistoryResultRequest;

import junit.framework.TestCase;

public class HIstoryResultFetcherTest extends TestCase {
	public void setUp() throws Exception{
		
	}
	
	public void tearDown() throws Exception{
		
	}
	
	public void testLoadContentSPTT() throws Exception{
		HistoryResultFetcher f = new HistoryResultFetcher(new SPTTHistoryResultRequest(2352).getURLStr());
		assertEquals(1, f.loadContent());
		System.out.println(f.getList());
	}
	
	public void testloadContent() throws Exception{
//		HTTPUserRequest ur  = new HTTPUserRequest("http://svenskaspel.se/common/infopopup/statistik.aspx?product=8");
		HistoryResultFetcher f = new HistoryResultFetcher(new SSLHistoryResultRequest(SSLHistoryResultRequest.LORDAG_TYPE, 2011, 29).getURLStr());
		assertEquals(2, f.loadContent());
		System.out.println(f.getList());
	}
	
	public void testloadContent2() throws Exception{
//		HTTPUserRequest ur  = new HTTPUserRequest("http://svenskaspel.se/common/infopopup/statistik.aspx?product=8");
		HistoryResultFetcher f = new HistoryResultFetcher(new SSLHistoryResultRequest(SSLHistoryResultRequest.ONSDAG_TYPE, 2011, 22).getURLStr());
		assertEquals(2, f.loadContent());
		System.out.println(f.getList());
	}
}
